using System;
using miPics.Common;


public partial class UserControl_ImageListItem : System.Web.UI.UserControl
{
	public string Name
	{
		set
		{
			if (!string.IsNullOrEmpty(value))
			{
				_Name.Visible = true;
				_Name.InnerText = value;
				_Thumbnail.Alt = ToolKit.GetAltImageName(value);
			}
			else
			{
				_Name.Visible = false;
				_Thumbnail.Alt = "Image";
			}
		}
	}

	public int ImageID
	{
		set
		{
			_NameLink.HRef = _ThumbnailLink.HRef = "~/Image/?id=" + value;
			_EditLink.HRef = "~/Administration/EditImage.aspx?id=" + value;
			_DeleteLink.HRef = "~/Administration/DeleteImage.aspx?id=" + value;
		}
	}

	public string Thumbnail
	{
		set { _Thumbnail.Src = "~/_Resource/Image/" + value; }
	}

	public int ThumbnailWidth
	{
		set { _Thumbnail.Width = value; }
	}

	public int ThumbnailHeight
	{
		set { _Thumbnail.Height = value; }
	}

	public bool EditMode
	{
		set { _EditOption.Visible = value; }
	}
}
